#pragma once

#include <stddef.h>
#include <stdint.h>

// #include "tracker_kcf.h"

#ifdef __cplusplus
extern "C" {
#endif

struct nctid_roi_t
{
    int16_t x;
    int16_t y;
    int16_t width;
    int16_t height;
};

extern const char* nctid_tracker_kcf_get_version();

/*
 * param unsignedpd_flag: 1 - use UnsignedPD
 */
extern void * nctid_tracker_kcf_open_session(int unsignedpd_flag);
extern void nctid_tracker_kcf_close_session(void *handle);
extern int nctid_tracker_kcf_init(void *handle, int img_width, int img_height, int patch_size, bool multiscale);
extern int nctid_tracker_kcf_update(void *handle, struct nctid_roi_t *roi, uint8_t *image, size_t size, float train_interp_factor, int32_t *dsp_usec);
extern int nctid_tracker_kcf_update2(void *handle, struct nctid_roi_t *roi, float train_interp_factor, int32_t *dsp_usec);
extern int nctid_tracker_kcf_detect(void *handle, struct nctid_roi_t *in_roi, struct nctid_roi_t *out_roi, uint8_t *out_image, size_t size, float *peak_value, int32_t *dsp_usec);

extern void nctid_tracker_kcf_get_debug(void *handle, uint8_t *data, size_t size);
#ifdef __cplusplus
}
#endif
